# -*- coding: utf-8 -*-
env = 'prod'

if env == 'prod':
    configs = {
        'mongo_or': {
            'mongo_uri': 'mongodb://pysp_sys_rw_pe:OmAvWHDd1YAc@dds-j6c2c085738a19441.mongodb.rds.aliyuncs.com:3717,dds-j6c2c085738a19442.mongodb.rds.aliyuncs.com:3717/hkex?replicaSet=mgset-14241859&readPreference=secondaryPreferred',
            'mongo_db': 'hkex'
        },
        'mongo_cr': {
            'mongo_uri': 'mongodb://hkex_cr_rw_pe:w63KxEiKsosN@dds-bp1d09d4b278ceb41363-pub.mongodb.rds.aliyuncs.com:3717,dds-bp1d09d4b278ceb42567-pub.mongodb.rds.aliyuncs.com:3717/cr_data?replicaSet=mgset-3255385&readPreference=secondaryPreferred',
            'mongo_db': 'cr_data'
        },
        'mongo_log_task': 'hkex_spider_task',
        'core_dc': {
            'host': '172.31.223.202',
            'port': 31306,
            'user': 'pysp_ms_rw_pe',
            'passwd': 'jfaNVq9WgEZZ',
            'db': 'hkex'
        },
        'redis': {
            'host': '172.31.223.207',
            'port': 8801,
            'db': 4,
            'password': 'R6Wmkm9jhhpU'
        },
        'aliyun_oss': {
            'key': 'LTAIYDfXVvJlTyfL',
            'secret': 'd4JiGu8UqFRnNeGxIBYh250Kmupuv7',
            'bucket': 'matrix-flow',
            'endpoint': 'oss-cn-hangzhou.aliyuncs.com',
        },
        'download_temp_dir': '/niub/tempfiles',
        'downloaded': True,
        'use_proxy': True,
        'redis_table': 'crawler_list',
        'max_process_count': 8,
        'redis_alive_hset': 'task_alive',
    }
elif env == 'test':
    configs = {
        'mongo_or': {
            'mongo_uri': 'mongodb://pysp_sys_rw_te:rldJ4m9kl2EX@dds-j6c2c085738a19441.mongodb.rds.aliyuncs.com:3717,dds-j6c2c085738a19442.mongodb.rds.aliyuncs.com:3717/hkex_pre?replicaSet=mgset-14241859&readPreference=secondaryPreferred',
            'mongo_db': 'hkex_pre'
        },
        'mongo_cr': {
            'mongo_uri': 'mongodb://pysp_sys_rw_te:rldJ4m9kl2EX@dds-j6c2c085738a19441.mongodb.rds.aliyuncs.com:3717,dds-j6c2c085738a19442.mongodb.rds.aliyuncs.com:3717/hkex_pre?replicaSet=mgset-14241859&readPreference=secondaryPreferred',
            'mongo_db': 'hkex_pre'
        },
        'mongo_log_task': 'hkex_spider_task',
        'core_dc': {
            'host': '172.31.223.202',
            'port': 31306,
            'user': 'pysp_ms_rw_te',
            'passwd': 'YVIML5jqR7cE',
            'db': 'hkex_pre'
        },
        'redis': {
            'host': '172.31.223.204',
            'port': 8801,
            'db': 4,
            'password': 'i3UmqJSmwodB'
        },
        'aliyun_oss': {
            'key': 'LTAIYDfXVvJlTyfL',
            'secret': 'd4JiGu8UqFRnNeGxIBYh250Kmupuv7',
            'bucket': 'matrix-flow',
            'endpoint': 'oss-cn-hangzhou.aliyuncs.com',
        },
        'download_temp_dir': '/niub/tempfiles',
        'downloaded': True,
        'use_proxy': True,
        'redis_table': 'crawler_list_test',
        'max_process_count': 8,
        'redis_alive_hset': 'task_alive',
    }
elif env == 'dev':
    configs = {
        'mongo_or': {
            'mongo_uri': 'mongodb://127.0.0.1:27017/original_data',
            'mongo_db': 'original_data'
        },
        'mongo_cr': {
            'mongo_uri': 'mongodb://127.0.0.1:27017/cr_data',
            'mongo_db': 'cr_data'
        },
        'mongo_log_task': 'hkex_spider_task',
        'core_dc': {
            'host': '127.0.0.1',
            'port': 3306,
            'user': 'root',
            'passwd': '',
            'db': 'core_doc'
        },
        'redis': {
            'host': '127.0.0.1',
            'port': 6379,
            'db': 4,
            'password': None
        },
        'aliyun_oss': {
            'key': 'LTAIYDfXVvJlTyfL',
            'secret': 'd4JiGu8UqFRnNeGxIBYh250Kmupuv7',
            'bucket': 'matrix-flow',
            'endpoint': 'oss-cn-hangzhou.aliyuncs.com',
        },
        'download_temp_dir': '~/download_tempfiles',
        'downloaded': False,
        'use_proxy': True,
        'redis_table': 'crawler_list_dev',
        'max_process_count': 1,
        'redis_alive_hset': 'task_alive',
    }
else:
    configs = {}
